如有问题联系V:fd8297
import openai
openai.api_key = 'xxxxxx'
messages=[]
messages.append({'role': 'system', 'content': "我希望你扮演一个小说家。您将提出富有创意和引人入胜的故事"})
messages.append({'role': 'user', 'content': "你好"})
response = openai.ChatCompletion.create(
    model='gpt-3.5-turbo',
    messages=messages,
)
ai_response = response.choices[0].message['content']
print(ai_response)

# gpt-4
# gpt-4-0314
# gpt-4-32k
# gpt-4-32k-0314
